<script>

var c = 'bd';

var i = 0;
var max = c.length;


initial:
while (i < max) {
c0:
switch (c[i]) {
	case 'a':
c1:	
		switch (c[i+1]) {
			case 'b':
				switch (c[i+2]) {
					case 'c':
						alert('<action abc>: abc');
						i += 3;
						continue initial;
				}
				alert('<action ab>: ab');
				i+=2
				continue initial;
		}
		break c0;
	case 'b':
c1:
		switch (c[i+1]) {
			case 'd':
				alert('<action:bd>: bd');
				i += 2;
				continue initial;
		}
		alert('<action b>: b');
		i += 1;
		continue initial;
}
alert('<action .>: ' + c[i]);
i+=1;
}


</script>

